﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Xmart.Action
{
    public interface IActionResult
    {
        /// <summary>
        /// 消息
        /// </summary>
        string Message { get; set; }
        /// <summary>
        /// 是否成功
        /// </summary>
        bool Success { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        int State { get; set; }
        /// <summary>
        /// 数据
        /// </summary>
        T GetData<T>();
        /// <summary>
        /// 数据
        /// </summary>
        object Data { get; set; }
        /// <summary>
        /// 消息清理
        /// </summary>
        void MsgClear();
        /// <summary>
        /// 消息添加
        /// </summary>
        /// <param name="msg"></param>
        /// <param name="args"></param>
        void MsgAppend(string msg, params object[] args);
        /// <summary>
        /// 消息新行
        /// </summary>
        /// <param name="msg"></param>
        void MsgAppendLine(string msg);
    }
}
